<?php

namespace App\Transformers;

use App\Models\Message;

class MessageTransformer extends BaseTransformer
{
    public function transform(Message $model)
    {
        return [
            'id' => $model->id,
            'user_id' => $model->user_id,
            'title' => $model->title,
            'content' => $model->content,
            'remarks' => $model->remarks,
            'type' => $model->type,
            'is_read' => $model->is_read,
            'created_at' => $model->created_at->toDateTimeString(),
        ];
    }
}
